package com.jinlia.show.modules.base.model.vo;

import com.jinlia.show.modules.base.system.entity.Label;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.util.List;

@Data
public class LabelVO extends Label {

    private List<LabelVO> children;
    public static LabelVO fromEntity(Label entity) {
        LabelVO vo = new LabelVO();
        BeanUtils.copyProperties(entity, vo);
        return vo;
    }

    public static Label toEntity(LabelVO vo) {
        Label entity = new Label();
        BeanUtils.copyProperties(vo, entity);
        return entity;
    }
}
